//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Spreadsheet.Extensibility;

namespace OpenLS.Spreadsheet.AnalysisToolPak
{
    [AddInFunctions]
    public class InformationFunctions
    {
        public static bool IsEven([AllowStringToDoubleConversion] double number)
        {
            int i = (int) Math.Floor(number);
            return i%2 == 0;
        }

        public static bool IsOdd([AllowStringToDoubleConversion] double number)
        {
            int i = (int) Math.Floor(number);
            return i%2 != 0;
        }
    }
}